package com.loan.common.oprator;

import com.alibaba.fastjson.JSONObject;
import com.loan.common.pay.oddpay.HttpClientUtil;
import com.loan.common.utils.HttpUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;

/**
 * @author shiguang
 * @date 2022年09月17日 17:16
 */
@Slf4j
public class OpratorUtils {

    /**
     * 查询运营商数据接口
     */
    private static final String URL = "http://reportapi.v1c.cc:5000/api/get_tele_report";

    private static final String USER_ID = "VTmaster";

    private static final String TOKEN = "0ce4f0810e8845048b298117f7a126c0";

    public static String getOprator(String phone) {
        HashMap<String,String> map = new HashMap<>();
        map.put("uid",USER_ID);
        map.put("sign",TOKEN);
        map.put("phone",phone);
        String result = HttpClientUtil.httpGet(URL, map);
        return result;
    }

    public static void main(String[] args) {
        String oprator = getOprator("0789512401");
        System.out.println(oprator);
    }
}
